package com.learning.cloud.entity;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * description:
 *
 * @author minghuiZhang
 * @date created in  14:33 2018/4/28
 * modified by
 */
@Data
public class User implements Serializable{
	private Long id;
	private String username;
	private String name;
	private Short age;
	private BigDecimal balance;

	public User id(Long id){
		this.id = id;
		return this;
	}
	public User username(String username){
		this.username = username;
		return this;
	}
	public User name(String name){
		this.name = name;
		return this;
	}
	public User age(Short age){
		this.age = age;
		return this;
	}
	public User balance(BigDecimal balance){
		this.balance = balance;
		return this;
	}

	public User build(){
		return new User(id,username,name,age,balance);
	}

	public User() {
	}

	public User(Long id, String username, String name, Short age, BigDecimal balance) {
		this.id = id;
		this.username = username;
		this.name = name;
		this.age = age;
		this.balance = balance;
	}
}
